<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>可从外部关闭的下来菜单</title>
    <link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="app" v-cloak>
    <div class="main" v-clickoutside="handleClose">
        <button @click="show=!show">点击显示下拉菜单</button>
        <div class="dropdown" v-show="show">
            <p>下拉框的内容，点击外面区域可以关闭</p>
        </div>
    </div>
</div>
<script src="../../js/vue.min.js"></script>
<script src="clickoutside.js"></script>
<script src="index.js"></script>
</body>
</html>